home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Sample Code / Snippets / AOCE / DragBusinessCard / README < prev    next >
Encoding:
Text File  |  1994-08-11  |  1.8 KB  |  17 lines  |  [TEXT/ttxt]

  1. /*************************************************
  2. * DragBusinessCard
  3. * 8/9/94
  4. *
  5. * Written by:  Scott Kuechle
  6. * Apple Developer Technical Support
  7. *
  8. * Code written in MPW (3.3.1) C
  9. * Compiles with the 68K interfaces.
  10. *************************************************/
  11.  
  12. This program shows how to accept drags of flavorTypeDirectory and flavorTypeHFS for a PowerTalk business card, and drags from the application to the Finder to create
  13. generic clippings that contain an empty packedDSSpec structure. It works as follows: launch the application and select "New" from the "File" menu. This creates a new window that you can drag things onto. Now, drag any PowerTalk business card onto the newly created window - the application should beep 3 times to verify that it has processed the drag into a valid DSSpec. If the business card contains a "work phone number" attribute, the number will be printed out in the window. If not, a message will indicate that one does not exist.
  14.  
  15. To drag from the application, hold down the command key while clicking in the window, and then drag into the Finder.  A generic clippings file will be created, but the file won't work like a business card (this will be added in the next revision of the program).
  16.  
  17. The program accepts drags of business cards that are either inside a personal catalog or those that are located anywhere on the user's system. If the business card is located inside a personal catalog, during the drag the application will be given an AOCE packedDSSpec structure representing that business card. If the business card is located somewhere else on the user's system, the application is not given a packedDSSpec, but instead is given just an FSSpec for the card. In this case, the program shows how to construct a packedDSSpec structure for the card, given just the FSSpec.